package com.cqhfan.file.config;

import com.cqhfan.file.utils.MinIOUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 眭传洪
 * @create 2025-07-29 23:57
 */
@Configuration
public class MinioConfig {

    @Bean
    public MinIOUtils minIOUtils(MinioProperties minioProperties) {
        return new MinIOUtils(
                minioProperties.getEndpoint(),
                minioProperties.getFileHost(),
                minioProperties.getBucketName(),
                minioProperties.getAccessKey(),
                minioProperties.getSecretKey()
        );
    }

}
